module.exports = function(db){
	db.User.hasMany(db.Role)
	db.Role.belongsToMany(db.User, {through: 'user_role'})
	db.Article.belongsTo(db.Cat)
	db.Cat.hasMany(db.Article)

	if(process.env.DB_DESIGN==='db_design'){
		let sql = db.sequelize.sync({
			force: true
		})
	}
}
